using System;

namespace Kiwi.Node.Modules
{
    public class ResolvedModule : IResolvedModule
    {
        public ResolvedModule(Func<IApplication, object> factory)
        {
            Factory = factory;
        }

        public Func<IApplication, object> Factory { get; set; }

        #region IResolvedModule Members

        public string Key { get; set; }

        public string Path { get; set; }

        public object Resolve(IApplication application)
        {
            return Factory(application);
        }

        #endregion
    }
}